 <style>
     .modal-fog {
        visibility: hidden;
        opacity:0.3;
     }
 </style>
    <div class="moda" id="login">
        <div class="close icon">
        </div>
        <div class="modal-head">
            <h1>登录</h1>
        </div>
        <form id="login-form" action="/users/login" method="post">
            <div class="border-wrap">
                <input type="text" placeholder="请输入用户名" required name="name">
            </div>
            <div class="border-wrap">
                <input type="password" placeholder="请输入密码" required name="password">
            </div>
            <input type="text" class="hidden" name="url" value="<%=url%>">
            <input class="login-submit" type="submit" style="width: 50%;" value="登录">
        </form>
    </div>
    <div class="moda" id="signin">
        <div class="close icon">
        </div>
        <div class="modal-head">
            <h1>注册</h1>
        </div>
        <form id="signup-form" action="/users/signup" method="post">
            <div class="border-wrap">
                <input type="text" placeholder="请输入用户名" required name="name">
            </div>
            <div class="border-wrap">
                <input type="password" placeholder="请输入密码" required name="password">
            </div>
            <div class="border-wrap">
                <input type="password" placeholder="请确认密码" required name="password_">
            </div>
            <input type="text" class="hidden" name="url" value="<%=url%>">
            <input class="login-submit" type="submit" value="注册">
        </form>
    </div>
    <div class="modal-fog">
    </div>
 <script>
     var error = "<%=error%>";
     $(document).ready(function() {
         if (error != '') {
            $.jGrowl(error, {
                life: 3000
            });
         }
         $("#signup-form").submit(function(event) {
            showLoading();
            if (this.password.value != this.password_.value) {
                $.jGrowl("两次密码不一致", {
                    life: 3000
                });
                hideLoading();
                return false;
            }
            return true;
         });
     });
 </script>